package cn.good.yan.model.controller;

import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * 测试： 用户数据，来源于数据库
 *
 * @author shengren.yan
 * @create 2024-07-16
 */
@RestController
@RequestMapping("/user")
public class UserController {



    // 获取当前用户  -  从授权服务器里得到
    @GetMapping("/getUser")
    public Object getUser(Authentication authentication) {
        System.out.println("--------------");
        return authentication;
    }

}
